package com.oig.sys.auth.entity;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.data.annotation.LastModifiedDate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;
import java.io.Serializable;

@Getter
@Setter
@ToString
@Entity
@Table(name = "tb_permission")
public class TbPermission  implements Serializable {

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer id;

	@Column(name = "system_id")
	private Integer systemId;

	@Column(name = "api_url")
	private String apiUrl;

	@Column(name = "api_name")
	private String apiName;

	@Column(name = "api_desc")
	private String apiDesc;

	private String status;

	@Column(name = "create_user_id")
	private Integer createUserId;

	@Column(name = "create_user_name")
	private String createUserName;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_time")
	private java.util.Date createTime;

	@Column(name = "last_update_id")
	private Integer lastUpdateId;

	@Column(name = "last_update_name")
	private String lastUpdateName;

	@LastModifiedDate
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "last_update_time")
	private java.util.Date lastUpdateTime;

	@Version
	private Integer version;

	//是否是 开放资源
	private String flag;	//0-授权资源 1-开放资源

}
